'use strict';

module.exports = app => {
    const {
        STRING,
        INTEGER
    } = app.Sequelize;
    const Studnet = app.model.define('student',{
        id:{
            type:INTEGER,
            primaryKey:true,
            autoIncrement:true,
            allowNull:false,
            comment:"学生查询ID"
        },
        name:{
            type:STRING,
            defaultValue:null,
            comment:"学生名字"
        },
        sex:{
            type:STRING,
            defaultValue:"1",
            comment:"学生性别（0为女1为男）"
        },
        studentNumber:{
            type:INTEGER,
            allowNull:false,
            unique: true,
            comment:"学号"
        },
        idNumber:{
            type:INTEGER,
            defaultValue:null,
            unique: true,
            comment:"身份证号"
        },
        phoneNumber:{
            type:INTEGER,
            defaultValue:null,
            comment:"手机号"
        },
        address:{
            type:STRING,
            defaultValue:null,
            comment:"住址"
        },
        class_name:{
            type:STRING,
            defaultValue:null,
            comment:"班级"
        },
        project:{
            type:STRING,
            defaultValue:null,
            comment:"项目"
        },
        state:{
            type:STRING,
            defaultValue:"1",
            comment:"状态(1为正常0为停用)"
        },
        birthday:{
            type:STRING,
            defaultValue:null,
            comment:"生日"
        }
    })
    Studnet.associate = function () {
        
    }
}